package com.wyl.auth.controller;

import com.wyl.auth.req.UserLoginLogReq;
import com.wyl.auth.service.UserLoginLogService;
import com.wyl.auth.vo.UserLoginLogVo;
import com.wyl.common.CommonPage;
import com.wyl.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @Description 用户登录日志表
* @Author WuYiLong
* @Date 2025-04-13
*/
@Api(tags = "用户登录日志表api")
@RestController
@RequestMapping("userLoginLog")
public class UserLoginLogController {

    @Autowired
    private UserLoginLogService userLoginLogService;

    @ApiOperation(value = "分页")
    @PostMapping(value = "page")
    public ResponseData<CommonPage<UserLoginLogVo>> page(@RequestBody UserLoginLogReq req) {
        return ResponseData.getSuccessInstance(userLoginLogService.page(req));
    }

    @ApiOperation(value = "删除")
    @PostMapping(value = "deleteByIds")
    public ResponseData deleteByIds(@RequestBody List<Long> ids) {
        userLoginLogService.deleteByIds(ids);
        return ResponseData.getSuccess();
    }

}
